//
// Created by lenovo on 2024/1/21.
//
#include "Calculator.h"
#include "../const/Functions.h"
#include <string>
void Calculator::loadFuncLib(const std::string& FuncLibName) {
    if (FuncLibName == "List")
        this->_identified_funcs->merge(Functions::ListFunc);
    else if (FuncLibName == "Triangle")
        this->_identified_funcs->merge(Functions::TriangleFunc);
    else{
        std::string _exp = "No such Function Lib named ";
        _exp += FuncLibName;
        throw std::out_of_range(_exp);
    }
}